<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <table width="100%" cellpadding="2" border="1" style="border-collapse:collapse;">
    <tr  style="text-align:center;background:#E7EBF7;height:22px;">
      <td style="width:5%;"></td>
      <td style="width:85%;"></td>
      <td style="width:5%;">Sửa</td>
      <td style="width:5%;">Thêm</td>
    </tr>
    <xsl:apply-templates select="/forum_admin/Category"></xsl:apply-templates>
  </table>
</xsl:template>

<!-- one category -->
<xsl:template match="/forum_admin/Category">
  <tr>
    <td colspan="2">
      <b>
        <xsl:value-of select="CatName"></xsl:value-of>
      </b>
    </td>
    <td style="text-align:center;">
      <a>
        <xsl:attribute name="href">
          <xsl:value-of select="edit_link"></xsl:value-of>
        </xsl:attribute>
        <img>
          <xsl:attribute name="src"><xsl:value-of select="/forum_admin/root_folder"></xsl:value-of>/images/edit.gif</xsl:attribute>
          <xsl:attribute name="border">0</xsl:attribute>
        </img>
      </a>
    </td>
    <td style="text-align:center;">
      <a>
        <xsl:attribute name="href">
          <xsl:value-of select="new_link"></xsl:value-of>
        </xsl:attribute>
        <img>
          <xsl:attribute name="src"><xsl:value-of select="/forum_admin/root_folder"></xsl:value-of>/images/new.gif</xsl:attribute>
          <xsl:attribute name="border">0</xsl:attribute>
        </img>
      </a>
    </td>
  </tr>
  <xsl:apply-templates select="Forum"></xsl:apply-templates>
</xsl:template>

<!--  one forum -->
<xsl:template match="Forum">
  <tr>
    <td style="text-align:center;">
      <xsl:value-of select="OrderIndex"></xsl:value-of>
    </td>
    <td>
      <a>
        <xsl:attribute name="src"><xsl:value-of select="link"></xsl:value-of></xsl:attribute>
        <xsl:value-of select="Name"></xsl:value-of>
      </a>
    </td>
    <td style="text-align:center;">
      <a>
        <xsl:attribute name="href"><xsl:value-of select="edit_link"></xsl:value-of></xsl:attribute>
        <img border="0">
          <xsl:attribute name="src"><xsl:value-of select="/forum_admin/root_folder"></xsl:value-of>/images/edit.gif</xsl:attribute>
        </img>
      </a>
    </td>
    <td style="text-align:center;">
      &#xa0;
    </td>
  </tr>
</xsl:template>
</xsl:stylesheet> 

